<?php

if (isset($_POST['installTable']) && is_array($_POST['installTable'])) {
    $tables = array_keys($_POST['installTable']);
    $updater->installTables($tables);
}

if (isset($_POST['structureTable']) && is_array($_POST['structureTable'])) {
    $tables = array_keys($_POST['structureTable']);
    if (!is_writable(DB_TABLES_PATH)) {
        $errorsTables = array('The structure folder is not writable [' . DB_TABLES_PATH . ']');
    } else {
        $updater->structureTables($tables);
    }
}

if (isset($_POST['dataTable']) && is_array($_POST['dataTable'])) {
    $tables = array_keys($_POST['dataTable']);
    if (!is_writable(DB_DATA_PATH)) {
        $errorsTables = array('The data folder is not writable [' . DB_DATA_PATH . ']');
    } else {
        $updater->dataTables($tables);
    }
}